package chapter8JVM_excute;

import java.io.Serializable;

//静态分配选择目标的过程 选择最合适的方法 最贴切的类型 如果是装箱对象则按照继承关系从上往下搜索
public class P83_2 {

    public static void sayhello(Object o){ System.out.println("Hello Object"); }
    public static void sayhello(int a){ System.out.println("Hello int"); }
    public static void sayhello(long a){ System.out.println("Hello long"); }
    public static void sayhello(Character a){ System.out.println("Hello Character"); }
    public static void sayhello(char a){ System.out.println("Hello char"); }
    public static void sayhello(Serializable a){ System.out.println("Hello Serializable"); }
    public static void sayhello(char... a){ System.out.println("Hello char..."); }

    public static void main(String[] args) {
        sayhello('a');
    }
}
